cmake_minimum_required(VERSION 3.0.2)
project(navigation_pkg)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  tf
  costmap_2d
  base_local_planner
  visualization_msgs
  pluginlib
  pcl_conversions
  pcl_ros
  eigen_conversions
  pcl_conversions
)

catkin_package(
  LIBRARIES obstacle_density_planner
  CATKIN_DEPENDS 
    roscpp 
    rospy 
    std_msgs 
    tf 
    costmap_2d 
    base_local_planner 
    visualization_msgs 
    pluginlib
)

find_package(YAML-CPP REQUIRED) 
find_package(PCL REQUIRED COMPONENTS common io filters)
find_package(Eigen3 REQUIRED)
include_directories(
  ${catkin_INCLUDE_DIRS}
  ${pluginlib_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
  ${EIGEN3_INCLUDE_DIRS}
)

# 可执行文件
add_executable(trans_tf_2d src/Trans_TF_2d.cpp)
add_executable(trans_tf_2d_odom src/Trans_TF_2d_odom.cpp)
add_executable(trans_odom_2d src/Trans_odom_2d.cpp)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3")

target_link_libraries(trans_tf_2d
  ${catkin_LIBRARIES}
)
target_link_libraries(trans_tf_2d_odom
  ${catkin_LIBRARIES}
)
target_link_libraries(trans_odom_2d
  ${catkin_LIBRARIES}
)




add_executable(pc_active_publisher src/pc_active_publisher.cpp)
target_link_libraries(pc_active_publisher
  ${catkin_LIBRARIES}
  ${PCL_LIBRARIES}
  ${YAML_CPP_LIBRARIES} 
)
# 安装Python脚本
catkin_install_python(PROGRAMS
  scripts/cruise_navigator.py
  scripts/stair_runner.py
  scripts/multi_mode_manager.py
  scripts/multi_mode_manager_origin.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
